#正向递增
s='helloword'
for i in range(0,len(s)):
    print(i,s[i],end='\t\t')

#反向递减






#切片操作
s1='hellopython'
s2=s1[0:5:2]
print(s2)
print(s1[:5:1])
#省略开始位置start，省略步长step
print(s1[:5:])
#省略结束位置
print(s1[0::1])
print(s1[5::])
print(s1[5:])#与22行代码相同，省略了结束，省略了步长
print(s1[::2])#0,2,4,6,8,10
print(s1[::-1])#逆序输出
print(s1[-1:-12:-1])